package com.erytech.linktalk.service.internal;

import org.opengoss.core.IStartable;

import com.erytech.linktalk.dao.DaoFacade;

public class UserCleaner implements IStartable {
	
	private DaoFacade daoFacade;

	public UserCleaner(DaoFacade daoFacade) {
		this.daoFacade = daoFacade;
	}

	public void start() throws Exception {
//		User all = new User();
//		all.setDescription("所有用户");
//		all.setName("所有人");
//		all.setId("所有人:default@localhost");
//		all.setImage("");
//		all.setRoomId("default@localhost");
//		all.setSex(1);
//		daoFacade.getUserDao().insertUser(all);
		daoFacade.getUserDao().deleteAllUsers();
	}

	public void stop() throws Exception {
		//do nothing.
	}

}
